package com.caseProject.puremvc.command
{
	import com.caseProject.puremvc.mediator.MainMediator;
	import com.caseProject.puremvc.mediator.MenuDiagramListMediator;
	import com.caseProject.puremvc.mediator.MenuEditOptionsMediator;
	import com.caseProject.puremvc.mediator.MenuProjectMediator;
	import com.caseProject.puremvc.mediator.MenuStateMediator;
	import com.caseProject.puremvc.mediator.StageMediator;
	import com.caseProject.puremvc.mediator.view.MainView;
	import com.caseProject.puremvc.model.ProjectProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class StartupCommand extends SimpleCommand
	{
		public function StartupCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void
		{
			var mainView:MainView = notification.getBody() as MainView;
			this.facade.registerMediator(new MainMediator (mainView));
			
			this.facade.registerProxy(new ProjectProxy());
			
			/*var stateMenuView:StateMenuView = mainView.diagramMenu as StateMenuView;
			this.facade.registerMediator(new StateMenuMediator(stateMenuView));*/
			
			this.facade.registerMediator(new MenuProjectMediator (mainView.projectMenu));
			this.facade.registerMediator(new StageMediator (mainView.projectStage));
			this.facade.registerMediator(new MenuDiagramListMediator (mainView.projectList));
			this.facade.registerMediator(new MenuEditOptionsMediator (mainView.menuEditOptions));			
		}
	}
}